package com.hopes.bizz.risk.transfer.bean.dto;

import com.hopes.bizz.risk.transfer.validation.DateTime;
import com.hopes.bizz.risk.transfer.validation.Include;
import com.hopes.bizz.risk.transfer.validation.MobilePhone;
import com.hopes.bizz.risk.transfer.validation.UUID;
import com.hopes.bizz.risk.transfer.validation.group.SeqOne;
import com.hopes.bizz.risk.transfer.validation.group.SeqTwo;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author lyb
 * @version 1.0
 * @description: 隐患排查记录
 * @date 2024/2/1 16:00
 */
@Data
public class RiskMeasuresTaskRecordDto extends RiskBaseDto {

    private static final long serialVersionUID = 91127673662003108L;


    @NotBlank(message = "隐患排查任务ID为空", groups = SeqOne.class)
    @UUID(message = "隐患排查任务ID不符合UUID正则", groups = SeqTwo.class)
    private String checkTaskId;

    @NotBlank(message = "任务排查时间为空", groups = SeqOne.class)
    @DateTime(message = "<<任务排查时间>>不符合时间格式", groups = SeqTwo.class)
    private String checkTime;

    @NotBlank(message = "手机识别码IMEI为空", groups = SeqOne.class)
    @Pattern(regexp = "^\\d{15,17}$", message = "手机识别码IMEI不符合IMEI正则", groups = SeqTwo.class)
    private String mobileMe;

    @NotBlank(message = "是否包保责任人任务标识为空", groups = SeqOne.class)
    @Include(item = {"0", "1"}, message = "是否包保责任人任务标识字典项不符合字典枚举,请核对文档<<是否包保责任人任务标识>>字典", groups = SeqTwo.class)
    private String isDefend;

    @NotBlank(message = "创建人为空", groups = SeqOne.class)
    private String createBy;

    @NotBlank(message = "创建人手机号为空", groups = SeqOne.class)
    @MobilePhone(message = "手机号码不符合正则", groups = SeqTwo.class)
    private String createByMobile;
}
